/*
 * AdBusView.java
 */

package adbus;

import adbus.models.*;
import javax.swing.event.ListSelectionEvent;
import org.jdesktop.application.Action;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionListener;
import org.jdesktop.application.ResourceMap;

/**
 * gluwna klasa odpowiedzialna za wyswietlanie aplikacji
 * i obsluge zdarzen
 * The application's main frame.
 */
public class AdBusView extends FrameView {
    private Kampania_Kontroler addCampaignBox;
    private Przewoźnik_Kontroler addCarrierBox;
    private Klient_Kontroler addClientBox;
    private Linia_Kontroler addLineBox;

    /** konstruktor*/
    public AdBusView(SingleFrameApplication app) {
        super(app);

        initComponents();
        campaignsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                campaignValueChanged(e);
            }
        });

        clientsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                clientValueChanged(e);
            }
        });
        carriersTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                carrierValueChanged(e);
            }
        });
        linesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                lineValueChanged(e);
            }
        });
        campaignsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                campaignValueChanged(e);
            }
        });


        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
    }

    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
            aboutBox = new AdBusAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        AdBusApp.getApplication().show(aboutBox);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        tabs = new javax.swing.JTabbedPane();
        campaignsTab = new javax.swing.JPanel();
        newCampaignButton = new javax.swing.JButton();
        campaignDetails = new javax.swing.JPanel();
        campaignNameLabel = new javax.swing.JLabel();
        deleteCampaignButton = new javax.swing.JButton();
        editCampaignButton = new javax.swing.JButton();
        campaignFromLabel = new javax.swing.JLabel();
        campaignAddedDate = new javax.swing.JLabel();
        campaignToLabel = new javax.swing.JLabel();
        campaignClientLabel = new javax.swing.JLabel();
        campaignClientName = new javax.swing.JLabel();
        campaignClientDetailsButton = new javax.swing.JButton();
        campaignCarriersLabel = new javax.swing.JLabel();
        campaignCarriersScrollPane = new javax.swing.JScrollPane();
        campaignCarriersList = new javax.swing.JList();
        campaignCarriersDetailsButton = new javax.swing.JButton();
        campaignAddedLabel = new javax.swing.JLabel();
        campaignLastsLabel = new javax.swing.JLabel();
        campaignDescriptionPanel = new javax.swing.JScrollPane();
        campaignDescription = new javax.swing.JTextArea();
        campaignFromDate = new javax.swing.JLabel();
        campaignToDate = new javax.swing.JLabel();
        campaignAdvertsLabel = new javax.swing.JLabel();
        campaignAdvertsPanel = new javax.swing.JScrollPane();
        campaignAdvertsList = new javax.swing.JList();
        campaignFiltersPanel = new javax.swing.JPanel();
        campaignToDate1TextField = new javax.swing.JTextField();
        campaignToEndFilterLabel = new javax.swing.JLabel();
        campaignToDate2FilterTextField = new javax.swing.JTextField();
        campaignFromDate2FilterTextField = new javax.swing.JTextField();
        campaignFromEndFilterLabel = new javax.swing.JLabel();
        clientsComboBox = new javax.swing.JComboBox();
        clientsFilterLabel = new javax.swing.JLabel();
        carriersFilterComboBox = new javax.swing.JComboBox();
        carriersFilterLabel = new javax.swing.JLabel();
        linesFilterComboBox = new javax.swing.JComboBox();
        linesFilterLabel = new javax.swing.JLabel();
        campaignToDateFilterLabel = new javax.swing.JLabel();
        campaignFromDate1FilterTextField = new javax.swing.JTextField();
        campaignFromFilterLabel = new javax.swing.JLabel();
        searchCampaignsButton = new javax.swing.JButton();
        campaignsScrollPane = new javax.swing.JScrollPane();
        campaignsTable = new javax.swing.JTable();
        resetCampaignsButton = new javax.swing.JButton();
        clientsTab = new javax.swing.JPanel();
        clientFilterPanel = new javax.swing.JPanel();
        clientNameFilterLabel = new javax.swing.JLabel();
        clientNipFilterLabel = new javax.swing.JLabel();
        clientNameFilterTextField = new javax.swing.JTextField();
        clientNipFilterTextField = new javax.swing.JTextField();
        clientPhoneFilterLabel = new javax.swing.JLabel();
        clientMailFilterLabel = new javax.swing.JLabel();
        clientPhoneFilterTextField = new javax.swing.JTextField();
        clientMailFilterTextField = new javax.swing.JTextField();
        clientContactPersonFilterTextField = new javax.swing.JTextField();
        clientContactPersonFilterLabel = new javax.swing.JLabel();
        clientAddressFilterTextField = new javax.swing.JTextField();
        clientAddressFilterLabel = new javax.swing.JLabel();
        clientDetailsPanel = new javax.swing.JPanel();
        clientName = new javax.swing.JLabel();
        deleteClientButton = new javax.swing.JButton();
        editClientButton = new javax.swing.JButton();
        clientAddressLine1 = new javax.swing.JLabel();
        clientNip = new javax.swing.JLabel();
        contactPersonLabel = new javax.swing.JLabel();
        clientNipLabel = new javax.swing.JLabel();
        clientAddressLabel = new javax.swing.JLabel();
        descriptionScrollPanel = new javax.swing.JScrollPane();
        clientDescription = new javax.swing.JTextArea();
        clientAddressLine2 = new javax.swing.JLabel();
        clientPhoneLabel = new javax.swing.JLabel();
        clientMailLabel = new javax.swing.JLabel();
        clientPhone = new javax.swing.JLabel();
        clientMail = new javax.swing.JLabel();
        contactPersonName = new javax.swing.JLabel();
        contactPersonPhone = new javax.swing.JLabel();
        contactPersonMail = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        clientAddedDateLabel = new javax.swing.JLabel();
        clientAddedDate = new javax.swing.JLabel();
        searchClientsButton = new javax.swing.JButton();
        newClientButton = new javax.swing.JButton();
        clientsScrollPanel = new javax.swing.JScrollPane();
        clientsTable = new javax.swing.JTable();
        resetClientsButton = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        jSeparator4 = new javax.swing.JSeparator();
        carriersTab = new javax.swing.JPanel();
        jSeparator6 = new javax.swing.JSeparator();
        carrierSearchButton = new javax.swing.JButton();
        newCarrierButton = new javax.swing.JButton();
        carrierFilterPanel = new javax.swing.JPanel();
        carrierNameFilterLabel = new javax.swing.JLabel();
        carrierAddressFilterLabel = new javax.swing.JLabel();
        carrierNameFilterTextField = new javax.swing.JTextField();
        carrierAddressFilterTextField = new javax.swing.JTextField();
        carrierMailFilterLabel = new javax.swing.JLabel();
        carrierContactPersonFilterLabel = new javax.swing.JLabel();
        carrierMailFilterTextField = new javax.swing.JTextField();
        carrierContactPersonFilterTextField = new javax.swing.JTextField();
        carrierPhoneFilterTextField = new javax.swing.JTextField();
        carrierPhoneFilterLabel = new javax.swing.JLabel();
        carriersScrollPanel = new javax.swing.JScrollPane();
        carriersTable = new javax.swing.JTable();
        carrierDetails = new javax.swing.JPanel();
        carrierName = new javax.swing.JLabel();
        deleteCarrierButton = new javax.swing.JButton();
        editCarrierButton = new javax.swing.JButton();
        carrierAddressLine1 = new javax.swing.JLabel();
        carrierContactPersonLabel = new javax.swing.JLabel();
        carrierAddressLabel = new javax.swing.JLabel();
        carrierDescriptionScrollPanel = new javax.swing.JScrollPane();
        carrierDescription = new javax.swing.JTextArea();
        carrierAddressLine2 = new javax.swing.JLabel();
        carrierPhoneLabel = new javax.swing.JLabel();
        carrierMailLabel = new javax.swing.JLabel();
        carrierPhone = new javax.swing.JLabel();
        carrierMail = new javax.swing.JLabel();
        carrierContactPersonName = new javax.swing.JLabel();
        carrierContactPhone = new javax.swing.JLabel();
        carrierContactMail = new javax.swing.JLabel();
        jSeparator5 = new javax.swing.JSeparator();
        carrierAddedLabel = new javax.swing.JLabel();
        carrierAdded = new javax.swing.JLabel();
        carrierLinesLabel = new javax.swing.JLabel();
        carrierLineButton = new javax.swing.JButton();
        carriersResetButton = new javax.swing.JButton();
        linesTab = new javax.swing.JPanel();
        linesScrollPanel = new javax.swing.JScrollPane();
        linesTable = new javax.swing.JTable();
        linesFilterPanel = new javax.swing.JPanel();
        lineNrFilterLabel = new javax.swing.JLabel();
        lineCarrierFilterLabel = new javax.swing.JLabel();
        lineNrFilterTextField = new javax.swing.JTextField();
        lineKeywordsFilterLabel = new javax.swing.JLabel();
        lineModelFilterLabel = new javax.swing.JLabel();
        lineKeywordsFilterTextField = new javax.swing.JTextField();
        lineWehicleNrFilterLabel = new javax.swing.JLabel();
        lineTypeFilterLabel = new javax.swing.JLabel();
        lineCarrierFilterComboBox = new javax.swing.JComboBox();
        lineWehicleNrFilterTextField = new javax.swing.JTextField();
        lineTypeFilterComboBox = new javax.swing.JComboBox();
        lineModelFilterComboBox = new javax.swing.JComboBox();
        jSeparator7 = new javax.swing.JSeparator();
        newLineButton = new javax.swing.JButton();
        resetLinesButton = new javax.swing.JButton();
        lineDetailsPanel = new javax.swing.JPanel();
        lineNameLabel = new javax.swing.JLabel();
        deleteLineButton = new javax.swing.JButton();
        editLineButton = new javax.swing.JButton();
        lineCoursesLabel = new javax.swing.JLabel();
        linekeywordsScrollPanel = new javax.swing.JScrollPane();
        lineKeywords = new javax.swing.JTextArea();
        lineCarrierNameLabel = new javax.swing.JLabel();
        lineCarrierName = new javax.swing.JLabel();
        lineKeywordsLabel = new javax.swing.JLabel();
        lineWeeks = new javax.swing.JCheckBox();
        lineDay = new javax.swing.JCheckBox();
        lineNight = new javax.swing.JCheckBox();
        lineWeekends = new javax.swing.JCheckBox();
        lineWehiclesLabel = new javax.swing.JLabel();
        lineDescriptionScrollPanel = new javax.swing.JScrollPane();
        lineDescription = new javax.swing.JTextArea();
        lineDescriptionLabel = new javax.swing.JLabel();
        lineWehiclesScrollPanel = new javax.swing.JScrollPane();
        lineWehiclesList = new javax.swing.JList();
        lineWehicleAddButton = new javax.swing.JButton();
        lineWehicleDelButton = new javax.swing.JButton();
        lineSearchButton = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();

        mainPanel.setMaximumSize(new java.awt.Dimension(1024, 768));
        mainPanel.setMinimumSize(new java.awt.Dimension(1024, 600));
        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setPreferredSize(new java.awt.Dimension(1024, 600));
        mainPanel.setRequestFocusEnabled(false);

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(adbus.AdBusApp.class).getContext().getResourceMap(AdBusView.class);
        tabs.setFont(resourceMap.getFont("tabs.font")); // NOI18N
        tabs.setMaximumSize(new java.awt.Dimension(1024, 768));
        tabs.setMinimumSize(new java.awt.Dimension(1000, 750));
        tabs.setName("tabs"); // NOI18N

        campaignsTab.setMaximumSize(new java.awt.Dimension(1024, 768));
        campaignsTab.setName("campaignsTab"); // NOI18N
        campaignsTab.setPreferredSize(new java.awt.Dimension(0, 0));

        newCampaignButton.setText(resourceMap.getString("newCampaignButton.text")); // NOI18N
        newCampaignButton.setAutoscrolls(true);
        newCampaignButton.setName("newCampaignButton"); // NOI18N
        newCampaignButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newCampaignButtonActionPerformed(evt);
            }
        });

        campaignDetails.setBorder(new javax.swing.border.LineBorder(resourceMap.getColor("campaignDetails.border.lineColor"), 1, true)); // NOI18N
        campaignDetails.setName("campaignDetails"); // NOI18N

        campaignNameLabel.setFont(resourceMap.getFont("campaignNameLabel.font")); // NOI18N
        campaignNameLabel.setText(resourceMap.getString("campaignNameLabel.text")); // NOI18N
        campaignNameLabel.setName("campaignNameLabel"); // NOI18N

        deleteCampaignButton.setText(resourceMap.getString("deleteCampaignButton.text")); // NOI18N
        deleteCampaignButton.setName("deleteCampaignButton"); // NOI18N
        deleteCampaignButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteCampaignButtonActionPerformed(evt);
            }
        });

        editCampaignButton.setText(resourceMap.getString("editCampaignButton.text")); // NOI18N
        editCampaignButton.setName("editCampaignButton"); // NOI18N
        editCampaignButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editCampaignButtonActionPerformed(evt);
            }
        });

        campaignFromLabel.setFont(resourceMap.getFont("campaignFromLabel.font")); // NOI18N
        campaignFromLabel.setText(resourceMap.getString("campaignFromLabel.text")); // NOI18N
        campaignFromLabel.setName("campaignFromLabel"); // NOI18N

        campaignAddedDate.setFont(resourceMap.getFont("campaignAddedDate.font")); // NOI18N
        campaignAddedDate.setText(resourceMap.getString("campaignAddedDate.text")); // NOI18N
        campaignAddedDate.setName("campaignAddedDate"); // NOI18N

        campaignToLabel.setFont(resourceMap.getFont("campaignToLabel.font")); // NOI18N
        campaignToLabel.setText(resourceMap.getString("campaignToLabel.text")); // NOI18N
        campaignToLabel.setName("campaignToLabel"); // NOI18N

        campaignClientLabel.setFont(resourceMap.getFont("campaignClientLabel.font")); // NOI18N
        campaignClientLabel.setForeground(resourceMap.getColor("campaignClientLabel.foreground")); // NOI18N
        campaignClientLabel.setText(resourceMap.getString("campaignClientLabel.text")); // NOI18N
        campaignClientLabel.setName("campaignClientLabel"); // NOI18N

        campaignClientName.setFont(resourceMap.getFont("campaignClientName.font")); // NOI18N
        campaignClientName.setText(resourceMap.getString("campaignClientName.text")); // NOI18N
        campaignClientName.setName("campaignClientName"); // NOI18N
        campaignClientName.setRequestFocusEnabled(false);

        campaignClientDetailsButton.setFont(resourceMap.getFont("campaignClientDetailsButton.font")); // NOI18N
        campaignClientDetailsButton.setText(resourceMap.getString("campaignClientDetailsButton.text")); // NOI18N
        campaignClientDetailsButton.setName("campaignClientDetailsButton"); // NOI18N

        campaignCarriersLabel.setFont(resourceMap.getFont("campaignCarriersLabel.font")); // NOI18N
        campaignCarriersLabel.setText(resourceMap.getString("campaignCarriersLabel.text")); // NOI18N
        campaignCarriersLabel.setName("campaignCarriersLabel"); // NOI18N

        campaignCarriersScrollPane.setAutoscrolls(true);
        campaignCarriersScrollPane.setHorizontalScrollBar(null);
        campaignCarriersScrollPane.setName("campaignCarriersScrollPane"); // NOI18N

        campaignCarriersList.setFont(resourceMap.getFont("campaignCarriersList.font")); // NOI18N
        campaignCarriersList.setAutoscrolls(false);
        campaignCarriersList.setName("campaignCarriersList"); // NOI18N
        campaignCarriersScrollPane.setViewportView(campaignCarriersList);

        campaignCarriersDetailsButton.setFont(resourceMap.getFont("campaignCarriersDetailsButton.font")); // NOI18N
        campaignCarriersDetailsButton.setText(resourceMap.getString("campaignCarriersDetailsButton.text")); // NOI18N
        campaignCarriersDetailsButton.setName("campaignCarriersDetailsButton"); // NOI18N
        campaignCarriersDetailsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                campaignCarriersDetailsButtonActionPerformed(evt);
            }
        });

        campaignAddedLabel.setText(resourceMap.getString("campaignAddedLabel.text")); // NOI18N
        campaignAddedLabel.setName("campaignAddedLabel"); // NOI18N

        campaignLastsLabel.setText(resourceMap.getString("campaignLastsLabel.text")); // NOI18N
        campaignLastsLabel.setName("campaignLastsLabel"); // NOI18N

        campaignDescriptionPanel.setName("campaignDescriptionPanel"); // NOI18N

        campaignDescription.setColumns(20);
        campaignDescription.setEditable(false);
        campaignDescription.setFont(clientDescription.getFont());
        campaignDescription.setForeground(resourceMap.getColor("campaignDescription.foreground")); // NOI18N
        campaignDescription.setLineWrap(true);
        campaignDescription.setRows(5);
        campaignDescription.setText(resourceMap.getString("campaignDescription.text")); // NOI18N
        campaignDescription.setWrapStyleWord(true);
        campaignDescription.setName("campaignDescription"); // NOI18N
        campaignDescription.setOpaque(false);
        campaignDescriptionPanel.setViewportView(campaignDescription);

        campaignFromDate.setFont(resourceMap.getFont("campaignFromDate.font")); // NOI18N
        campaignFromDate.setText(resourceMap.getString("campaignFromDate.text")); // NOI18N
        campaignFromDate.setName("campaignFromDate"); // NOI18N

        campaignToDate.setFont(resourceMap.getFont("campaignToDate.font")); // NOI18N
        campaignToDate.setText(resourceMap.getString("campaignToDate.text")); // NOI18N
        campaignToDate.setName("campaignToDate"); // NOI18N

        campaignAdvertsLabel.setText(resourceMap.getString("campaignAdvertsLabel.text")); // NOI18N
        campaignAdvertsLabel.setName("campaignAdvertsLabel"); // NOI18N

        campaignAdvertsPanel.setAutoscrolls(true);
        campaignAdvertsPanel.setHorizontalScrollBar(null);
        campaignAdvertsPanel.setName("campaignAdvertsPanel"); // NOI18N

        campaignAdvertsList.setAutoscrolls(false);
        campaignAdvertsList.setName("campaignAdvertsList"); // NOI18N
        campaignAdvertsList.setOpaque(false);
        campaignAdvertsPanel.setViewportView(campaignAdvertsList);

        javax.swing.GroupLayout campaignDetailsLayout = new javax.swing.GroupLayout(campaignDetails);
        campaignDetails.setLayout(campaignDetailsLayout);
        campaignDetailsLayout.setHorizontalGroup(
            campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(campaignDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(campaignNameLabel)
                    .addComponent(campaignCarriersLabel)
                    .addGroup(campaignDetailsLayout.createSequentialGroup()
                        .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(campaignClientLabel)
                            .addComponent(campaignLastsLabel)
                            .addComponent(campaignAddedLabel))
                        .addGap(21, 21, 21)
                        .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(campaignDetailsLayout.createSequentialGroup()
                                .addComponent(campaignFromLabel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(campaignFromDate)
                                .addGap(13, 13, 13)
                                .addComponent(campaignToLabel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(campaignToDate))
                            .addComponent(campaignAddedDate)
                            .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, campaignDetailsLayout.createSequentialGroup()
                                    .addComponent(campaignClientName)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(campaignClientDetailsButton))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, campaignDetailsLayout.createSequentialGroup()
                                    .addComponent(campaignCarriersScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(campaignCarriersDetailsButton)))))
                    .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, campaignDetailsLayout.createSequentialGroup()
                            .addComponent(editCampaignButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(deleteCampaignButton, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, campaignDetailsLayout.createSequentialGroup()
                            .addComponent(campaignAdvertsLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(campaignAdvertsPanel))
                        .addComponent(campaignDescriptionPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 563, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(106, Short.MAX_VALUE))
        );
        campaignDetailsLayout.setVerticalGroup(
            campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(campaignDetailsLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(campaignNameLabel)
                .addGap(10, 10, 10)
                .addComponent(campaignDescriptionPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(campaignAddedDate)
                    .addComponent(campaignAddedLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campaignFromLabel)
                    .addComponent(campaignToLabel)
                    .addComponent(campaignToDate)
                    .addComponent(campaignFromDate)
                    .addComponent(campaignLastsLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campaignClientName)
                    .addComponent(campaignClientLabel)
                    .addComponent(campaignClientDetailsButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(campaignCarriersDetailsButton)
                    .addComponent(campaignCarriersLabel)
                    .addComponent(campaignCarriersScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(campaignDetailsLayout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addComponent(campaignAdvertsLabel))
                    .addGroup(campaignDetailsLayout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(campaignAdvertsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(campaignDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(editCampaignButton, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(deleteCampaignButton, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        campaignFiltersPanel.setName("campaignFiltersPanel"); // NOI18N

        campaignToDate1TextField.setMaximumSize(new java.awt.Dimension(72, 22));
        campaignToDate1TextField.setMinimumSize(new java.awt.Dimension(72, 22));
        campaignToDate1TextField.setName("campaignToDate1TextField"); // NOI18N

        campaignToEndFilterLabel.setText(resourceMap.getString("campaignToEndFilterLabel.text")); // NOI18N
        campaignToEndFilterLabel.setName("campaignToEndFilterLabel"); // NOI18N

        campaignToDate2FilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        campaignToDate2FilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        campaignToDate2FilterTextField.setName("campaignToDate2FilterTextField"); // NOI18N

        campaignFromDate2FilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        campaignFromDate2FilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        campaignFromDate2FilterTextField.setName("campaignFromDate2FilterTextField"); // NOI18N

        campaignFromEndFilterLabel.setText(resourceMap.getString("campaignFromEndFilterLabel.text")); // NOI18N
        campaignFromEndFilterLabel.setName("campaignFromEndFilterLabel"); // NOI18N

        clientsComboBox.setModel(new KlientList());
        clientsComboBox.setName("clientsComboBox"); // NOI18N

        clientsFilterLabel.setText(resourceMap.getString("clientsFilterLabel.text")); // NOI18N
        clientsFilterLabel.setName("clientsFilterLabel"); // NOI18N

        carriersFilterComboBox.setModel(new PrzewoznikList());
        carriersFilterComboBox.setName("carriersFilterComboBox"); // NOI18N

        carriersFilterLabel.setText(resourceMap.getString("carriersFilterLabel.text")); // NOI18N
        carriersFilterLabel.setName("carriersFilterLabel"); // NOI18N

        linesFilterComboBox.setModel(new LiniaList());

        linesFilterLabel.setText(resourceMap.getString("linesFilterLabel.text")); // NOI18N
        linesFilterLabel.setName("linesFilterLabel"); // NOI18N

        campaignToDateFilterLabel.setText(resourceMap.getString("campaignToDateFilterLabel.text")); // NOI18N
        campaignToDateFilterLabel.setName("campaignToDateFilterLabel"); // NOI18N

        campaignFromDate1FilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        campaignFromDate1FilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        campaignFromDate1FilterTextField.setName("campaignFromDate1FilterTextField"); // NOI18N

        campaignFromFilterLabel.setText(resourceMap.getString("campaignFromFilterLabel.text")); // NOI18N
        campaignFromFilterLabel.setName("campaignFromFilterLabel"); // NOI18N

        javax.swing.GroupLayout campaignFiltersPanelLayout = new javax.swing.GroupLayout(campaignFiltersPanel);
        campaignFiltersPanel.setLayout(campaignFiltersPanelLayout);
        campaignFiltersPanelLayout.setHorizontalGroup(
            campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(campaignFiltersPanelLayout.createSequentialGroup()
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(campaignFromFilterLabel)
                    .addComponent(campaignToDateFilterLabel)
                    .addComponent(clientsFilterLabel)
                    .addComponent(carriersFilterLabel))
                .addGap(27, 27, 27)
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(carriersFilterComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(clientsComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(campaignToDate1TextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(campaignFromDate1FilterTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(campaignFiltersPanelLayout.createSequentialGroup()
                        .addComponent(linesFilterLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(linesFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(campaignFiltersPanelLayout.createSequentialGroup()
                            .addComponent(campaignFromEndFilterLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(campaignFromDate2FilterTextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, campaignFiltersPanelLayout.createSequentialGroup()
                            .addComponent(campaignToEndFilterLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(campaignToDate2FilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(78, 78, 78))
        );
        campaignFiltersPanelLayout.setVerticalGroup(
            campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(campaignFiltersPanelLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campaignFromDate1FilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(campaignFromFilterLabel)
                    .addComponent(campaignFromEndFilterLabel)
                    .addComponent(campaignFromDate2FilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campaignToDateFilterLabel)
                    .addComponent(campaignToDate1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(campaignToEndFilterLabel)
                    .addComponent(campaignToDate2FilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(clientsFilterLabel)
                    .addComponent(clientsComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(linesFilterLabel)
                    .addComponent(linesFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(campaignFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(carriersFilterLabel)
                    .addComponent(carriersFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        searchCampaignsButton.setText(resourceMap.getString("searchCampaignsButton.text")); // NOI18N
        searchCampaignsButton.setName("searchCampaignsButton"); // NOI18N
        searchCampaignsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchCampaignsButtonActionPerformed(evt);
            }
        });

        campaignsScrollPane.setName("campaignsScrollPane"); // NOI18N

        campaignsTable.setAutoCreateRowSorter(true);
        campaignsTable.setModel(new adbus.models.KampaniaTable());
        campaignsTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        campaignsTable.setName("campaignsTable"); // NOI18N
        campaignsScrollPane.setViewportView(campaignsTable);

        resetCampaignsButton.setText(resourceMap.getString("resetCampaignsButton.text")); // NOI18N
        resetCampaignsButton.setName("resetCampaignsButton"); // NOI18N
        resetCampaignsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resetCampaignsButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout campaignsTabLayout = new javax.swing.GroupLayout(campaignsTab);
        campaignsTab.setLayout(campaignsTabLayout);
        campaignsTabLayout.setHorizontalGroup(
            campaignsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(campaignsTabLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(campaignsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(campaignsTabLayout.createSequentialGroup()
                        .addComponent(newCampaignButton, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(campaignFiltersPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 415, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(campaignsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(searchCampaignsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(resetCampaignsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(campaignsTabLayout.createSequentialGroup()
                        .addComponent(campaignsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 432, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(campaignDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(32, 32, 32))
        );
        campaignsTabLayout.setVerticalGroup(
            campaignsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(campaignsTabLayout.createSequentialGroup()
                .addGroup(campaignsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(campaignsTabLayout.createSequentialGroup()
                        .addGap(33, 33, 33)
                        .addComponent(newCampaignButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(campaignFiltersPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(campaignsTabLayout.createSequentialGroup()
                        .addComponent(searchCampaignsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(resetCampaignsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(campaignsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(campaignDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(campaignsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 475, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(821, Short.MAX_VALUE))
        );

        tabs.addTab(resourceMap.getString("campaignsTab.TabConstraints.tabTitle"), campaignsTab); // NOI18N

        clientsTab.setMaximumSize(new java.awt.Dimension(1024, 768));
        clientsTab.setName("clientsTab"); // NOI18N
        clientsTab.setPreferredSize(new java.awt.Dimension(0, 0));

        clientFilterPanel.setName("clientFilterPanel"); // NOI18N

        clientNameFilterLabel.setText(resourceMap.getString("clientNameFilterLabel.text")); // NOI18N
        clientNameFilterLabel.setName("clientNameFilterLabel"); // NOI18N

        clientNipFilterLabel.setText(resourceMap.getString("clientNipFilterLabel.text")); // NOI18N
        clientNipFilterLabel.setName("clientNipFilterLabel"); // NOI18N

        clientNameFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        clientNameFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        clientNameFilterTextField.setName("clientNameFilterTextField"); // NOI18N

        clientNipFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        clientNipFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        clientNipFilterTextField.setName("clientNipFilterTextField"); // NOI18N

        clientPhoneFilterLabel.setText(resourceMap.getString("clientPhoneFilterLabel.text")); // NOI18N
        clientPhoneFilterLabel.setName("clientPhoneFilterLabel"); // NOI18N

        clientMailFilterLabel.setText(resourceMap.getString("clientMailFilterLabel.text")); // NOI18N
        clientMailFilterLabel.setName("clientMailFilterLabel"); // NOI18N

        clientPhoneFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        clientPhoneFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        clientPhoneFilterTextField.setName("clientPhoneFilterTextField"); // NOI18N

        clientMailFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        clientMailFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        clientMailFilterTextField.setName("clientMailFilterTextField"); // NOI18N

        clientContactPersonFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        clientContactPersonFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        clientContactPersonFilterTextField.setName("clientContactPersonFilterTextField"); // NOI18N

        clientContactPersonFilterLabel.setText(resourceMap.getString("clientContactPersonFilterLabel.text")); // NOI18N
        clientContactPersonFilterLabel.setName("clientContactPersonFilterLabel"); // NOI18N

        clientAddressFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        clientAddressFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        clientAddressFilterTextField.setName("clientAddressFilterTextField"); // NOI18N

        clientAddressFilterLabel.setText(resourceMap.getString("clientAddressFilterLabel.text")); // NOI18N
        clientAddressFilterLabel.setName("clientAddressFilterLabel"); // NOI18N

        javax.swing.GroupLayout clientFilterPanelLayout = new javax.swing.GroupLayout(clientFilterPanel);
        clientFilterPanel.setLayout(clientFilterPanelLayout);
        clientFilterPanelLayout.setHorizontalGroup(
            clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientFilterPanelLayout.createSequentialGroup()
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(clientAddressFilterLabel)
                    .addComponent(clientNipFilterLabel)
                    .addComponent(clientNameFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(clientNipFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientAddressFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientNameFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(clientPhoneFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(clientMailFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(clientContactPersonFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(clientPhoneFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientMailFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientContactPersonFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(220, Short.MAX_VALUE))
        );
        clientFilterPanelLayout.setVerticalGroup(
            clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientFilterPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(clientPhoneFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientNameFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientNameFilterLabel)
                    .addComponent(clientPhoneFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(clientMailFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientMailFilterLabel)
                    .addComponent(clientNipFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientNipFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(clientContactPersonFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientContactPersonFilterLabel)
                    .addComponent(clientAddressFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(clientAddressFilterLabel))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        clientDetailsPanel.setBorder(new javax.swing.border.LineBorder(resourceMap.getColor("clientDetailsPanel.border.lineColor"), 1, true)); // NOI18N
        clientDetailsPanel.setName("clientDetailsPanel"); // NOI18N

        clientName.setFont(campaignNameLabel.getFont());
        clientName.setText(resourceMap.getString("clientName.text")); // NOI18N
        clientName.setName("clientName"); // NOI18N

        deleteClientButton.setText(resourceMap.getString("deleteClientButton.text")); // NOI18N
        deleteClientButton.setName("deleteClientButton"); // NOI18N
        deleteClientButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteClientButtonActionPerformed(evt);
            }
        });

        editClientButton.setText(resourceMap.getString("editClientButton.text")); // NOI18N
        editClientButton.setName("editClientButton"); // NOI18N
        editClientButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editClientButtonActionPerformed(evt);
            }
        });

        clientAddressLine1.setFont(resourceMap.getFont("clientAddressLine1.font")); // NOI18N
        clientAddressLine1.setText(resourceMap.getString("clientAddressLine1.text")); // NOI18N
        clientAddressLine1.setName("clientAddressLine1"); // NOI18N

        clientNip.setFont(resourceMap.getFont("clientNip.font")); // NOI18N
        clientNip.setText(resourceMap.getString("clientNip.text")); // NOI18N
        clientNip.setName("clientNip"); // NOI18N

        contactPersonLabel.setText(resourceMap.getString("contactPersonLabel.text")); // NOI18N
        contactPersonLabel.setName("contactPersonLabel"); // NOI18N

        clientNipLabel.setText(resourceMap.getString("clientNipLabel.text")); // NOI18N
        clientNipLabel.setName("clientNipLabel"); // NOI18N

        clientAddressLabel.setText(resourceMap.getString("clientAddressLabel.text")); // NOI18N
        clientAddressLabel.setName("clientAddressLabel"); // NOI18N

        descriptionScrollPanel.setName("descriptionScrollPanel"); // NOI18N

        clientDescription.setColumns(20);
        clientDescription.setFont(resourceMap.getFont("clientDescription.font")); // NOI18N
        clientDescription.setLineWrap(true);
        clientDescription.setRows(5);
        clientDescription.setText(resourceMap.getString("clientDescription.text")); // NOI18N
        clientDescription.setWrapStyleWord(true);
        clientDescription.setName("clientDescription"); // NOI18N
        clientDescription.setOpaque(false);
        descriptionScrollPanel.setViewportView(clientDescription);

        clientAddressLine2.setFont(resourceMap.getFont("clientAddressLine2.font")); // NOI18N
        clientAddressLine2.setText(resourceMap.getString("clientAddressLine2.text")); // NOI18N
        clientAddressLine2.setName("clientAddressLine2"); // NOI18N

        clientPhoneLabel.setText(resourceMap.getString("clientPhoneLabel.text")); // NOI18N
        clientPhoneLabel.setName("clientPhoneLabel"); // NOI18N

        clientMailLabel.setText(resourceMap.getString("clientMailLabel.text")); // NOI18N
        clientMailLabel.setName("clientMailLabel"); // NOI18N

        clientPhone.setFont(resourceMap.getFont("clientPhone.font")); // NOI18N
        clientPhone.setName("clientPhone"); // NOI18N

        clientMail.setFont(resourceMap.getFont("clientMail.font")); // NOI18N
        clientMail.setText(resourceMap.getString("clientMail.text")); // NOI18N
        clientMail.setName("clientMail"); // NOI18N

        contactPersonName.setFont(resourceMap.getFont("ccontactPersonName.font")); // NOI18N
        contactPersonName.setText(resourceMap.getString("ccontactPersonName.text")); // NOI18N
        contactPersonName.setName("ccontactPersonName"); // NOI18N

        contactPersonPhone.setFont(resourceMap.getFont("ccontactPersonPhone.font")); // NOI18N
        contactPersonPhone.setText(resourceMap.getString("ccontactPersonPhone.text")); // NOI18N
        contactPersonPhone.setName("ccontactPersonPhone"); // NOI18N

        contactPersonMail.setFont(resourceMap.getFont("contactPersonMail.font")); // NOI18N
        contactPersonMail.setText(resourceMap.getString("contactPersonMail.text")); // NOI18N
        contactPersonMail.setName("contactPersonMail"); // NOI18N

        jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator3.setName("jSeparator3"); // NOI18N

        clientAddedDateLabel.setText(resourceMap.getString("clientAddedDateLabel.text")); // NOI18N
        clientAddedDateLabel.setName("clientAddedDateLabel"); // NOI18N

        clientAddedDate.setFont(resourceMap.getFont("clientAddedDate.font")); // NOI18N
        clientAddedDate.setText(resourceMap.getString("clientAddedDate.text")); // NOI18N
        clientAddedDate.setName("clientAddedDate"); // NOI18N
        clientAddedDate.setPreferredSize(new java.awt.Dimension(72, 17));

        javax.swing.GroupLayout clientDetailsPanelLayout = new javax.swing.GroupLayout(clientDetailsPanel);
        clientDetailsPanel.setLayout(clientDetailsPanelLayout);
        clientDetailsPanelLayout.setHorizontalGroup(
            clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addComponent(clientName))
            .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, clientDetailsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                                .addComponent(clientNipLabel)
                                .addGap(67, 67, 67)
                                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(clientNip)
                                    .addComponent(clientAddressLine1)))
                            .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                                .addGap(86, 86, 86)
                                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(clientAddressLine2)
                                    .addComponent(clientPhone)
                                    .addComponent(clientMail)))
                            .addComponent(clientMailLabel)
                            .addComponent(clientPhoneLabel)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, clientDetailsPanelLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(clientAddressLabel)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(contactPersonLabel)
                    .addComponent(contactPersonPhone)
                    .addComponent(contactPersonName, javax.swing.GroupLayout.DEFAULT_SIZE, 537, Short.MAX_VALUE)
                    .addComponent(contactPersonMail, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
            .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                .addGap(556, 556, 556)
                .addComponent(clientAddedDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(48, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, clientDetailsPanelLayout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, clientDetailsPanelLayout.createSequentialGroup()
                        .addComponent(editClientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 332, Short.MAX_VALUE)
                        .addComponent(deleteClientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(descriptionScrollPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 580, Short.MAX_VALUE)
                    .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                        .addComponent(clientAddedDateLabel)
                        .addGap(465, 465, 465)))
                .addGap(88, 88, 88))
        );
        clientDetailsPanelLayout.setVerticalGroup(
            clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(clientName)
                .addGap(18, 18, 18)
                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                        .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(clientNipLabel)
                            .addComponent(clientNip))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(clientAddressLabel)
                            .addComponent(clientAddressLine1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(clientAddressLine2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(clientPhone, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(clientPhoneLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(clientMail, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(clientMailLabel, javax.swing.GroupLayout.Alignment.TRAILING)))
                    .addGroup(clientDetailsPanelLayout.createSequentialGroup()
                        .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, clientDetailsPanelLayout.createSequentialGroup()
                                .addComponent(contactPersonLabel)
                                .addGap(7, 7, 7)
                                .addComponent(contactPersonName, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(contactPersonPhone, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(contactPersonMail, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(clientAddedDateLabel)
                .addGap(50, 50, 50)
                .addComponent(descriptionScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(clientDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(deleteClientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(editClientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(clientAddedDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(187, 187, 187))
        );

        searchClientsButton.setText(resourceMap.getString("searchClientsButton.text")); // NOI18N
        searchClientsButton.setName("searchClientsButton"); // NOI18N
        searchClientsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchClientsButtonActionPerformed(evt);
            }
        });

        newClientButton.setText(resourceMap.getString("newClientButton.text")); // NOI18N
        newClientButton.setAutoscrolls(true);
        newClientButton.setName("newClientButton"); // NOI18N
        newClientButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newClientButtonActionPerformed(evt);
            }
        });

        clientsScrollPanel.setAutoscrolls(true);
        clientsScrollPanel.setName("clientsScrollPanel"); // NOI18N

        clientsTable.setAutoCreateRowSorter(true);
        clientsTable.setModel(new adbus.models.KlientTable());
        clientsTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        clientsTable.setName("clientsTable"); // NOI18N
        clientsTable.getTableHeader().setReorderingAllowed(false);
        clientsScrollPanel.setViewportView(clientsTable);

        resetClientsButton.setText(resourceMap.getString("resetClientsButton.text")); // NOI18N
        resetClientsButton.setName("resetClientsButton"); // NOI18N
        resetClientsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resetClientsButtonActionPerformed(evt);
            }
        });

        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator2.setName("jSeparator2"); // NOI18N

        jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator4.setName("jSeparator4"); // NOI18N

        javax.swing.GroupLayout clientsTabLayout = new javax.swing.GroupLayout(clientsTab);
        clientsTab.setLayout(clientsTabLayout);
        clientsTabLayout.setHorizontalGroup(
            clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientsTabLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(clientsTabLayout.createSequentialGroup()
                        .addComponent(clientsScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(clientDetailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(clientsTabLayout.createSequentialGroup()
                        .addComponent(newClientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(clientsTabLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(clientsTabLayout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(clientFilterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(12, 12, 12)
                                .addGroup(clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(resetClientsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(searchClientsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(113, 113, 113)))
                .addContainerGap())
        );
        clientsTabLayout.setVerticalGroup(
            clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientsTabLayout.createSequentialGroup()
                .addGroup(clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(clientsTabLayout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(newClientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(clientsTabLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(resetClientsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(searchClientsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(clientFilterPanel, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(clientsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(clientDetailsPanel, 0, 479, Short.MAX_VALUE)
                    .addComponent(clientsScrollPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE))
                .addGap(890, 890, 890))
        );

        tabs.addTab(resourceMap.getString("clientsTab.TabConstraints.tabTitle"), clientsTab); // NOI18N

        carriersTab.setMaximumSize(new java.awt.Dimension(1024, 768));
        carriersTab.setName("carriersTab"); // NOI18N
        carriersTab.setPreferredSize(new java.awt.Dimension(0, 0));

        jSeparator6.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator6.setName("jSeparator6"); // NOI18N

        carrierSearchButton.setText(resourceMap.getString("carrierSearchButton.text")); // NOI18N
        carrierSearchButton.setName("carrierSearchButton"); // NOI18N
        carrierSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                carrierSearchButtonActionPerformed(evt);
            }
        });

        newCarrierButton.setText(resourceMap.getString("newCarrierButton.text")); // NOI18N
        newCarrierButton.setAutoscrolls(true);
        newCarrierButton.setName("newCarrierButton"); // NOI18N
        newCarrierButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newCarrierButtonActionPerformed(evt);
            }
        });

        carrierFilterPanel.setName("carrierFilterPanel"); // NOI18N

        carrierNameFilterLabel.setText(resourceMap.getString("carrierNameFilterLabel.text")); // NOI18N
        carrierNameFilterLabel.setName("carrierNameFilterLabel"); // NOI18N

        carrierAddressFilterLabel.setText(resourceMap.getString("carrierAddressFilterLabel.text")); // NOI18N
        carrierAddressFilterLabel.setName("carrierAddressFilterLabel"); // NOI18N

        carrierNameFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        carrierNameFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        carrierNameFilterTextField.setName("carrierNameFilterTextField"); // NOI18N

        carrierAddressFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        carrierAddressFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        carrierAddressFilterTextField.setName("carrierAddressFilterTextField"); // NOI18N

        carrierMailFilterLabel.setText(resourceMap.getString("carrierMailFilterLabel.text")); // NOI18N
        carrierMailFilterLabel.setName("carrierMailFilterLabel"); // NOI18N

        carrierContactPersonFilterLabel.setText(resourceMap.getString("carrierContactPersonFilterLabel.text")); // NOI18N
        carrierContactPersonFilterLabel.setName("carrierContactPersonFilterLabel"); // NOI18N

        carrierMailFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        carrierMailFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        carrierMailFilterTextField.setName("carrierMailFilterTextField"); // NOI18N

        carrierContactPersonFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        carrierContactPersonFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        carrierContactPersonFilterTextField.setName("carrierContactPersonFilterTextField"); // NOI18N

        carrierPhoneFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        carrierPhoneFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        carrierPhoneFilterTextField.setName("carrierPhoneFilterTextField"); // NOI18N

        carrierPhoneFilterLabel.setText(resourceMap.getString("carrierPhoneFilterLabel.text")); // NOI18N
        carrierPhoneFilterLabel.setName("carrierPhoneFilterLabel"); // NOI18N

        javax.swing.GroupLayout carrierFilterPanelLayout = new javax.swing.GroupLayout(carrierFilterPanel);
        carrierFilterPanel.setLayout(carrierFilterPanelLayout);
        carrierFilterPanelLayout.setHorizontalGroup(
            carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carrierFilterPanelLayout.createSequentialGroup()
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(carrierPhoneFilterLabel)
                    .addComponent(carrierAddressFilterLabel)
                    .addComponent(carrierNameFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierAddressFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierPhoneFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierNameFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierMailFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(carrierContactPersonFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierMailFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierContactPersonFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(220, Short.MAX_VALUE))
        );
        carrierFilterPanelLayout.setVerticalGroup(
            carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carrierFilterPanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(carrierMailFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierNameFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierNameFilterLabel)
                    .addComponent(carrierMailFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(carrierContactPersonFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierContactPersonFilterLabel)
                    .addComponent(carrierAddressFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierAddressFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(carrierPhoneFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierPhoneFilterLabel)))
        );

        carriersScrollPanel.setName("carriersScrollPanel"); // NOI18N

        carriersTable.setAutoCreateRowSorter(true);
        carriersTable.setModel(new adbus.models.PrzewoznikTable());
        carriersTable.setName("carriersTable"); // NOI18N
        carriersTable.getTableHeader().setReorderingAllowed(false);
        carriersScrollPanel.setViewportView(carriersTable);
        carriersTable.getColumnModel().getColumn(0).setResizable(false);
        carriersTable.getColumnModel().getColumn(0).setPreferredWidth(15);
        carriersTable.getColumnModel().getColumn(2).setPreferredWidth(45);
        carriersTable.getColumnModel().getColumn(3).setResizable(false);
        carriersTable.getColumnModel().getColumn(3).setPreferredWidth(5);

        carrierDetails.setBorder(new javax.swing.border.LineBorder(resourceMap.getColor("carrierDetails.border.lineColor"), 1, true)); // NOI18N
        carrierDetails.setName("carrierDetails"); // NOI18N

        carrierName.setFont(campaignNameLabel.getFont());
        carrierName.setText(resourceMap.getString("carrierName.text")); // NOI18N
        carrierName.setName("carrierName"); // NOI18N

        deleteCarrierButton.setText(resourceMap.getString("deleteCarrierButton.text")); // NOI18N
        deleteCarrierButton.setName("deleteCarrierButton"); // NOI18N
        deleteCarrierButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                deleteCarrierButtonMouseClicked(evt);
            }
        });
        deleteCarrierButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteCarrierButtonActionPerformed(evt);
            }
        });

        editCarrierButton.setText(resourceMap.getString("editCarrierButton.text")); // NOI18N
        editCarrierButton.setName("editCarrierButton"); // NOI18N
        editCarrierButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editCarrierButtonActionPerformed(evt);
            }
        });

        carrierAddressLine1.setFont(resourceMap.getFont("carrierAddressLine1.font")); // NOI18N
        carrierAddressLine1.setText(resourceMap.getString("carrierAddressLine1.text")); // NOI18N
        carrierAddressLine1.setName("carrierAddressLine1"); // NOI18N

        carrierContactPersonLabel.setText(resourceMap.getString("carrierContactPersonLabel.text")); // NOI18N
        carrierContactPersonLabel.setName("carrierContactPersonLabel"); // NOI18N

        carrierAddressLabel.setText(resourceMap.getString("carrierAddressLabel.text")); // NOI18N
        carrierAddressLabel.setName("carrierAddressLabel"); // NOI18N

        carrierDescriptionScrollPanel.setName("carrierDescriptionScrollPanel"); // NOI18N

        carrierDescription.setColumns(20);
        carrierDescription.setFont(resourceMap.getFont("carrierDescription.font")); // NOI18N
        carrierDescription.setLineWrap(true);
        carrierDescription.setRows(5);
        carrierDescription.setText(resourceMap.getString("carrierDescription.text")); // NOI18N
        carrierDescription.setWrapStyleWord(true);
        carrierDescription.setName("carrierDescription"); // NOI18N
        carrierDescription.setOpaque(false);
        carrierDescriptionScrollPanel.setViewportView(carrierDescription);

        carrierAddressLine2.setFont(resourceMap.getFont("carrierAddressLine2.font")); // NOI18N
        carrierAddressLine2.setText(resourceMap.getString("carrierAddressLine2.text")); // NOI18N
        carrierAddressLine2.setName("carrierAddressLine2"); // NOI18N

        carrierPhoneLabel.setText(resourceMap.getString("carrierPhoneLabel.text")); // NOI18N
        carrierPhoneLabel.setName("carrierPhoneLabel"); // NOI18N

        carrierMailLabel.setText(resourceMap.getString("carrierMailLabel.text")); // NOI18N
        carrierMailLabel.setName("carrierMailLabel"); // NOI18N

        carrierPhone.setText(resourceMap.getString("carrierPhone.text")); // NOI18N
        carrierPhone.setName("carrierPhone"); // NOI18N

        carrierMail.setText(resourceMap.getString("carrierMail.text")); // NOI18N
        carrierMail.setName("carrierMail"); // NOI18N

        carrierContactPersonName.setText(resourceMap.getString("carrierContactPersonName.text")); // NOI18N
        carrierContactPersonName.setName("carrierContactPersonName"); // NOI18N

        carrierContactPhone.setText(resourceMap.getString("carrierContactPhone.text")); // NOI18N
        carrierContactPhone.setName("carrierContactPhone"); // NOI18N

        carrierContactMail.setText(resourceMap.getString("carrierContactMail.text")); // NOI18N
        carrierContactMail.setName("carrierContactMail"); // NOI18N

        jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL);

        carrierAddedLabel.setText(resourceMap.getString("carrierAddedLabel.text")); // NOI18N
        carrierAddedLabel.setName("carrierAddedLabel"); // NOI18N

        carrierAdded.setFont(resourceMap.getFont("carrierAdded.font")); // NOI18N
        carrierAdded.setText(resourceMap.getString("carrierAdded.text")); // NOI18N
        carrierAdded.setName("carrierAdded"); // NOI18N

        carrierLinesLabel.setText(resourceMap.getString("carrierLinesLabel.text")); // NOI18N
        carrierLinesLabel.setName("carrierLinesLabel"); // NOI18N

        carrierLineButton.setFont(resourceMap.getFont("carrierLineButton.font")); // NOI18N
        carrierLineButton.setText(resourceMap.getString("carrierLineButton.text")); // NOI18N
        carrierLineButton.setName("carrierLineButton"); // NOI18N
        carrierLineButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                carrierLineButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout carrierDetailsLayout = new javax.swing.GroupLayout(carrierDetails);
        carrierDetails.setLayout(carrierDetailsLayout);
        carrierDetailsLayout.setHorizontalGroup(
            carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addComponent(carrierName))
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, carrierDetailsLayout.createSequentialGroup()
                        .addGap(86, 86, 86)
                        .addComponent(carrierAddressLine1))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, carrierDetailsLayout.createSequentialGroup()
                        .addGap(86, 86, 86)
                        .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(carrierAddressLine2)
                            .addComponent(carrierPhone)
                            .addComponent(carrierMail)))
                    .addComponent(carrierMailLabel, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierPhoneLabel, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierAddressLabel, javax.swing.GroupLayout.Alignment.LEADING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(carrierContactPersonName, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierContactPersonLabel, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierContactPhone, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierContactMail, javax.swing.GroupLayout.Alignment.LEADING)))
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(carrierDetailsLayout.createSequentialGroup()
                        .addComponent(carrierAddedLabel)
                        .addGap(28, 28, 28)
                        .addComponent(carrierAdded))
                    .addGroup(carrierDetailsLayout.createSequentialGroup()
                        .addGap(151, 151, 151)
                        .addComponent(carrierLineButton, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(183, 183, 183))
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(carrierLinesLabel)
                .addContainerGap(564, Short.MAX_VALUE))
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(carrierDescriptionScrollPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 656, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(editCarrierButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 408, Short.MAX_VALUE)
                .addComponent(deleteCarrierButton, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        carrierDetailsLayout.setVerticalGroup(
            carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carrierDetailsLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(carrierName)
                .addGap(18, 18, 18)
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(carrierDetailsLayout.createSequentialGroup()
                        .addComponent(carrierContactPersonLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(carrierContactPersonName)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(carrierContactPhone)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(carrierContactMail))
                    .addGroup(carrierDetailsLayout.createSequentialGroup()
                        .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(carrierAddressLabel)
                            .addComponent(carrierAddressLine1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(carrierAddressLine2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(carrierPhone, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(carrierPhoneLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(carrierMail, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(carrierMailLabel, javax.swing.GroupLayout.Alignment.TRAILING)))
                    .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carrierAddedLabel)
                    .addComponent(carrierAdded))
                .addGap(49, 49, 49)
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(carrierLinesLabel)
                    .addComponent(carrierLineButton))
                .addGap(18, 18, 18)
                .addComponent(carrierDescriptionScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(carrierDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(deleteCarrierButton, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(editCarrierButton, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        carriersResetButton.setText(resourceMap.getString("carriersResetButton.text")); // NOI18N
        carriersResetButton.setName("carriersResetButton"); // NOI18N
        carriersResetButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                carriersResetButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout carriersTabLayout = new javax.swing.GroupLayout(carriersTab);
        carriersTab.setLayout(carriersTabLayout);
        carriersTabLayout.setHorizontalGroup(
            carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carriersTabLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(carriersTabLayout.createSequentialGroup()
                        .addComponent(newCarrierButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(carrierFilterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(carrierSearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(carriersResetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(carriersTabLayout.createSequentialGroup()
                        .addComponent(carriersScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(carrierDetails, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        carriersTabLayout.setVerticalGroup(
            carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(carriersTabLayout.createSequentialGroup()
                .addGroup(carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(carriersTabLayout.createSequentialGroup()
                            .addGroup(carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(carriersTabLayout.createSequentialGroup()
                                    .addGap(32, 32, 32)
                                    .addComponent(newCarrierButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(carrierFilterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE))
                        .addGroup(carriersTabLayout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                    .addGroup(carriersTabLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(carriersResetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(carrierSearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)))
                .addGroup(carriersTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(carriersScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 485, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(carrierDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(807, 807, 807))
        );

        tabs.addTab(resourceMap.getString("carriersTab.TabConstraints.tabTitle"), carriersTab); // NOI18N

        linesTab.setMaximumSize(new java.awt.Dimension(1024, 768));
        linesTab.setName("linesTab"); // NOI18N
        linesTab.setPreferredSize(new java.awt.Dimension(0, 0));

        linesScrollPanel.setName("linesScrollPanel"); // NOI18N

        linesTable.setAutoCreateRowSorter(true);
        linesTable.setModel(new adbus.models.LiniaTable());
        linesTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        linesTable.setName("linesTable"); // NOI18N
        linesTable.getTableHeader().setReorderingAllowed(false);
        linesScrollPanel.setViewportView(linesTable);

        linesFilterPanel.setName("linesFilterPanel"); // NOI18N

        lineNrFilterLabel.setText(resourceMap.getString("lineNrFilterLabel.text")); // NOI18N
        lineNrFilterLabel.setName("lineNrFilterLabel"); // NOI18N

        lineCarrierFilterLabel.setText(resourceMap.getString("lineCarrierFilterLabel.text")); // NOI18N
        lineCarrierFilterLabel.setName("lineCarrierFilterLabel"); // NOI18N

        lineNrFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        lineNrFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        lineNrFilterTextField.setName("lineNrFilterTextField"); // NOI18N

        lineKeywordsFilterLabel.setText(resourceMap.getString("lineKeywordsFilterLabel.text")); // NOI18N
        lineKeywordsFilterLabel.setName("lineKeywordsFilterLabel"); // NOI18N

        lineModelFilterLabel.setText(resourceMap.getString("lineModelFilterLabel.text")); // NOI18N
        lineModelFilterLabel.setName("lineModelFilterLabel"); // NOI18N

        lineKeywordsFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        lineKeywordsFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        lineKeywordsFilterTextField.setName("lineKeywordsFilterTextField"); // NOI18N

        lineWehicleNrFilterLabel.setText(resourceMap.getString("lineWehicleNrFilterLabel.text")); // NOI18N
        lineWehicleNrFilterLabel.setName("lineWehicleNrFilterLabel"); // NOI18N

        lineTypeFilterLabel.setText(resourceMap.getString("lineTypeFilterLabel.text")); // NOI18N
        lineTypeFilterLabel.setName("lineTypeFilterLabel"); // NOI18N

        lineCarrierFilterComboBox.setModel(new PrzewoznikList());
        lineCarrierFilterComboBox.setName("lineCarrierFilterComboBox"); // NOI18N

        lineWehicleNrFilterTextField.setMaximumSize(new java.awt.Dimension(72, 22));
        lineWehicleNrFilterTextField.setMinimumSize(new java.awt.Dimension(72, 22));
        lineWehicleNrFilterTextField.setName("lineWehicleNrFilterTextField"); // NOI18N

        lineTypeFilterComboBox.setModel(new TypList());
        lineTypeFilterComboBox.setName("lineTypeFilterComboBox"); // NOI18N

        lineModelFilterComboBox.setModel(new ModelList());
        lineModelFilterComboBox.setName("lineModelFilterComboBox"); // NOI18N

        javax.swing.GroupLayout linesFilterPanelLayout = new javax.swing.GroupLayout(linesFilterPanel);
        linesFilterPanel.setLayout(linesFilterPanelLayout);
        linesFilterPanelLayout.setHorizontalGroup(
            linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(linesFilterPanelLayout.createSequentialGroup()
                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lineCarrierFilterLabel)
                    .addComponent(lineNrFilterLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lineNrFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lineCarrierFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(54, 54, 54)
                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lineKeywordsFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lineKeywordsFilterLabel))
                .addGap(18, 18, 18)
                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lineWehicleNrFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lineTypeFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lineModelFilterLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lineTypeFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lineWehicleNrFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lineModelFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        linesFilterPanelLayout.setVerticalGroup(
            linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(linesFilterPanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, linesFilterPanelLayout.createSequentialGroup()
                        .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lineWehicleNrFilterLabel)
                                .addComponent(lineWehicleNrFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(linesFilterPanelLayout.createSequentialGroup()
                                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                                    .addComponent(lineNrFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lineNrFilterLabel))
                                .addGap(7, 7, 7)
                                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                                    .addComponent(lineCarrierFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lineCarrierFilterLabel)))
                            .addGroup(linesFilterPanelLayout.createSequentialGroup()
                                .addComponent(lineKeywordsFilterLabel)
                                .addGap(7, 7, 7)
                                .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lineKeywordsFilterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lineTypeFilterLabel)
                                    .addComponent(lineTypeFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(25, 25, 25))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, linesFilterPanelLayout.createSequentialGroup()
                        .addGroup(linesFilterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lineModelFilterLabel)
                            .addComponent(lineModelFilterComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())))
        );

        jSeparator7.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator7.setName("jSeparator7"); // NOI18N

        newLineButton.setText(resourceMap.getString("newLineButton.text")); // NOI18N
        newLineButton.setAutoscrolls(true);
        newLineButton.setName("newLineButton"); // NOI18N
        newLineButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newLineButtonActionPerformed(evt);
            }
        });

        resetLinesButton.setText(resourceMap.getString("resetLinesButton.text")); // NOI18N
        resetLinesButton.setName("resetLinesButton"); // NOI18N
        resetLinesButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resetLinesButtonActionPerformed(evt);
            }
        });

        lineDetailsPanel.setBorder(new javax.swing.border.LineBorder(resourceMap.getColor("lineDetailsPanel.border.lineColor"), 1, true)); // NOI18N
        lineDetailsPanel.setName("lineDetailsPanel"); // NOI18N

        lineNameLabel.setFont(campaignNameLabel.getFont());
        lineNameLabel.setText(resourceMap.getString("lineNameLabel.text")); // NOI18N
        lineNameLabel.setName("lineNameLabel"); // NOI18N
        lineNameLabel.setPreferredSize(new java.awt.Dimension(56, 22));

        deleteLineButton.setText(resourceMap.getString("deleteLineButton.text")); // NOI18N
        deleteLineButton.setName("deleteLineButton"); // NOI18N
        deleteLineButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteLineButtonActionPerformed(evt);
            }
        });

        editLineButton.setText(resourceMap.getString("editLineButton.text")); // NOI18N
        editLineButton.setName("editLineButton"); // NOI18N
        editLineButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editLineButtonActionPerformed(evt);
            }
        });

        lineCoursesLabel.setText(resourceMap.getString("lineCoursesLabel.text")); // NOI18N
        lineCoursesLabel.setName("lineCoursesLabel"); // NOI18N

        linekeywordsScrollPanel.setName("linekeywordsScrollPanel"); // NOI18N

        lineKeywords.setColumns(20);
        lineKeywords.setFont(resourceMap.getFont("lineKeywords.font")); // NOI18N
        lineKeywords.setLineWrap(true);
        lineKeywords.setRows(5);
        lineKeywords.setText(resourceMap.getString("lineKeywords.text")); // NOI18N
        lineKeywords.setWrapStyleWord(true);
        lineKeywords.setName("lineKeywords"); // NOI18N
        lineKeywords.setOpaque(false);
        linekeywordsScrollPanel.setViewportView(lineKeywords);

        lineCarrierNameLabel.setText(resourceMap.getString("lineCarrierNameLabel.text")); // NOI18N
        lineCarrierNameLabel.setName("lineCarrierNameLabel"); // NOI18N

        lineCarrierName.setFont(resourceMap.getFont("lineCarrierName.font")); // NOI18N
        lineCarrierName.setText(resourceMap.getString("lineCarrierName.text")); // NOI18N
        lineCarrierName.setName("lineCarrierName"); // NOI18N

        lineKeywordsLabel.setText(resourceMap.getString("lineKeywordsLabel.text")); // NOI18N
        lineKeywordsLabel.setName("lineKeywordsLabel"); // NOI18N

        lineWeeks.setText(resourceMap.getString("lineWeeks.text")); // NOI18N
        lineWeeks.setEnabled(false);
        lineWeeks.setName("lineWeeks"); // NOI18N

        lineDay.setText(resourceMap.getString("lineDay.text")); // NOI18N
        lineDay.setEnabled(false);
        lineDay.setName("lineDay"); // NOI18N

        lineNight.setText(resourceMap.getString("lineNight.text")); // NOI18N
        lineNight.setEnabled(false);
        lineNight.setName("lineNight"); // NOI18N

        lineWeekends.setText(resourceMap.getString("lineWeekends.text")); // NOI18N
        lineWeekends.setEnabled(false);
        lineWeekends.setName("lineWeekends"); // NOI18N

        lineWehiclesLabel.setText(resourceMap.getString("lineWehiclesLabel.text")); // NOI18N
        lineWehiclesLabel.setName("lineWehiclesLabel"); // NOI18N

        lineDescriptionScrollPanel.setName("lineDescriptionScrollPanel"); // NOI18N

        lineDescription.setColumns(20);
        lineDescription.setFont(resourceMap.getFont("lineDescription.font")); // NOI18N
        lineDescription.setLineWrap(true);
        lineDescription.setRows(5);
        lineDescription.setText(resourceMap.getString("lineDescription.text")); // NOI18N
        lineDescription.setWrapStyleWord(true);
        lineDescription.setName("lineDescription"); // NOI18N
        lineDescription.setOpaque(false);
        lineDescriptionScrollPanel.setViewportView(lineDescription);

        lineDescriptionLabel.setText(resourceMap.getString("lineDescriptionLabel.text")); // NOI18N
        lineDescriptionLabel.setName("lineDescriptionLabel"); // NOI18N

        lineWehiclesScrollPanel.setName("lineWehiclesScrollPanel"); // NOI18N

        lineWehiclesList.setName("lineWehiclesList"); // NOI18N
        lineWehiclesScrollPanel.setViewportView(lineWehiclesList);

        lineWehicleAddButton.setText(resourceMap.getString("lineWehicleAddButton.text")); // NOI18N
        lineWehicleAddButton.setName("lineWehicleAddButton"); // NOI18N
        lineWehicleAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lineWehicleAddButtonActionPerformed(evt);
            }
        });

        lineWehicleDelButton.setText(resourceMap.getString("lineWehicleDelButton.text")); // NOI18N
        lineWehicleDelButton.setName("lineWehicleDelButton"); // NOI18N
        lineWehicleDelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lineWehicleDelButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout lineDetailsPanelLayout = new javax.swing.GroupLayout(lineDetailsPanel);
        lineDetailsPanel.setLayout(lineDetailsPanelLayout);
        lineDetailsPanelLayout.setHorizontalGroup(
            lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(lineNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lineCoursesLabel)
                        .addGap(18, 18, 18)
                        .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lineWeekends)
                            .addComponent(lineWeeks))
                        .addGap(18, 18, 18)
                        .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lineNight)
                            .addComponent(lineDay)))
                    .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(editLineButton, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE)
                        .addGap(43, 43, 43)
                        .addComponent(deleteLineButton, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                                .addGap(86, 86, 86)
                                .addComponent(lineCarrierName))
                            .addComponent(lineCarrierNameLabel)
                            .addComponent(lineKeywordsLabel)
                            .addComponent(linekeywordsScrollPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
                            .addComponent(lineDescriptionScrollPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
                            .addComponent(lineDescriptionLabel)
                            .addComponent(lineWehiclesLabel)
                            .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                                .addComponent(lineWehiclesScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lineWehicleAddButton)
                                    .addComponent(lineWehicleDelButton))))))
                .addContainerGap())
        );
        lineDetailsPanelLayout.setVerticalGroup(
            lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lineDetailsPanelLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(lineNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lineCoursesLabel)
                    .addComponent(lineWeeks)
                    .addComponent(lineDay))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lineWeekends)
                    .addComponent(lineNight))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lineCarrierName, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lineCarrierNameLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(37, 37, 37)
                .addComponent(lineKeywordsLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linekeywordsScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lineDescriptionLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lineDescriptionScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lineWehiclesLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, lineDetailsPanelLayout.createSequentialGroup()
                        .addComponent(lineWehicleDelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lineWehicleAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lineWehiclesScrollPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addGroup(lineDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(editLineButton, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(deleteLineButton, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        lineSearchButton.setText(resourceMap.getString("lineSearchButton.text")); // NOI18N
        lineSearchButton.setName("lineSearchButton"); // NOI18N
        lineSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lineSearchButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout linesTabLayout = new javax.swing.GroupLayout(linesTab);
        linesTab.setLayout(linesTabLayout);
        linesTabLayout.setHorizontalGroup(
            linesTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, linesTabLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(linesTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(linesTabLayout.createSequentialGroup()
                        .addComponent(newLineButton, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(linesFilterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(51, 51, 51)
                        .addGroup(linesTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(resetLinesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lineSearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(linesTabLayout.createSequentialGroup()
                        .addComponent(linesScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 689, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                        .addComponent(lineDetailsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        linesTabLayout.setVerticalGroup(
            linesTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(linesTabLayout.createSequentialGroup()
                .addGroup(linesTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(linesTabLayout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(newLineButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(linesTabLayout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(linesFilterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(linesTabLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(resetLinesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lineSearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(linesTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(linesScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 485, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lineDetailsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(810, 810, 810))
        );

        tabs.addTab(resourceMap.getString("linesTab.TabConstraints.tabTitle"), linesTab); // NOI18N

        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tabs, javax.swing.GroupLayout.PREFERRED_SIZE, 1150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tabs, javax.swing.GroupLayout.DEFAULT_SIZE, 1457, Short.MAX_VALUE))
        );

        menuBar.setName("menuBar"); // NOI18N

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(adbus.AdBusApp.class).getContext().getActionMap(AdBusView.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setMinimumSize(new java.awt.Dimension(1044, 750));
        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 1165, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 995, Short.MAX_VALUE)
                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents
/**metoda odpowiedzialna za obsluge przycisku dodawania nowej kampanii*/
    private void newCampaignButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newCampaignButtonActionPerformed
      //if (addCampaignBox == null) {
            JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
            addCampaignBox = new Kampania_Kontroler(mainFrame, (KampaniaTable) campaignsTable.getModel());
            addCampaignBox.setLocationRelativeTo(mainFrame);
        //}
        AdBusApp.getApplication().show(addCampaignBox);
    }//GEN-LAST:event_newCampaignButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku dodawania nowego klienta*/
    private void newClientButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newClientButtonActionPerformed
        
 if (addClientBox == null) {
            JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
            addClientBox = new Klient_Kontroler(mainFrame, (KlientTable) clientsTable.getModel());
            //addClientBox.clientsTable = clientsTable;
            addClientBox.setLocationRelativeTo(mainFrame);
        }
        AdBusApp.getApplication().show(addClientBox);
    }//GEN-LAST:event_newClientButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku szukaj z wybranym filtrem w kliencie*/
    private void searchClientsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchClientsButtonActionPerformed
        //((KlientTable) clientsTable.getModel()).setDateFilter(clientAddedDateFromFilterTextField.getText(), clientAddedDateToFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).setAddressFilter(clientAddressFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).setMailFilter(clientMailFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).setNipFilter(clientNipFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).setPhoneFilter(clientPhoneFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).setNameFilter(clientNameFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).setContactPersonFilter(clientContactPersonFilterTextField.getText());
        ((KlientTable) clientsTable.getModel()).zaladuj();
    }//GEN-LAST:event_searchClientsButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku reset w kampanii */
    private void resetCampaignsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetCampaignsButtonActionPerformed
        campaignFromDate1FilterTextField.setText("");
        campaignFromDate2FilterTextField.setText("");
        campaignToDate1TextField.setText("");
        campaignToDate2FilterTextField.setText("");
        clientsComboBox.getModel().setSelectedItem(clientsComboBox.getModel().getElementAt(0));
        carriersFilterComboBox.getModel().setSelectedItem(carriersFilterComboBox.getModel().getElementAt(0));
        linesFilterComboBox.getModel().setSelectedItem(linesFilterComboBox.getModel().getElementAt(0));
        ((KampaniaTable) campaignsTable.getModel()).resetFilters();
    }//GEN-LAST:event_resetCampaignsButtonActionPerformed
//*metoda odpowiedzialna za obsluge przycisku reset w kliencie*/
    private void resetClientsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetClientsButtonActionPerformed
        //clientAddedDateFromFilterTextField.setText("");
        //clientAddedDateToFilterTextField.setText("");
        clientNameFilterTextField.setText("");
        clientAddressFilterTextField.setText("");
        clientMailFilterTextField.setText("");
        clientPhoneFilterTextField.setText("");
        clientContactPersonFilterTextField.setText("");
        clientNipFilterTextField.setText("");
        ((KlientTable) clientsTable.getModel()).resetFilters();
    }//GEN-LAST:event_resetClientsButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku szukaj z wybranym filtrem w przewozniku*/
    private void carrierSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_carrierSearchButtonActionPerformed
        // TODO add your handling code here:
        //((PrzewoznikTable) carriersTable.getModel()).setDateFilter(carrierAddedDateFromFilterTextField.getText(), carrierAddedDateToFilterTextField.getText());
        ((PrzewoznikTable) carriersTable.getModel()).setAddressFilter(carrierAddressFilterTextField.getText());
        ((PrzewoznikTable) carriersTable.getModel()).setMailFilter(carrierMailFilterTextField.getText());
        ((PrzewoznikTable) carriersTable.getModel()).setPhoneFilter(carrierPhoneFilterTextField.getText());
        ((PrzewoznikTable) carriersTable.getModel()).setNameFilter(carrierNameFilterTextField.getText());
        ((PrzewoznikTable) carriersTable.getModel()).setContactPersonFilter(carrierContactPersonFilterTextField.getText());
        ((PrzewoznikTable) carriersTable.getModel()).zaladuj();
    }//GEN-LAST:event_carrierSearchButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku restet w przewozniku*/
    private void carriersResetButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_carriersResetButtonActionPerformed
        carrierPhoneFilterTextField.setText("");
       // carrierAddedDateFromFilterTextField.setText("");
        //carrierAddedDateToFilterTextField.setText("");
        carrierNameFilterTextField.setText("");
        carrierAddressFilterTextField.setText("");
        carrierMailFilterTextField.setText("");
        carrierPhoneFilterTextField.setText("");
        carrierContactPersonFilterTextField.setText("");
        ((PrzewoznikTable) carriersTable.getModel()).resetFilters();
    
    }//GEN-LAST:event_carriersResetButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku dodawania nowego przewoznika*/
    private void newCarrierButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newCarrierButtonActionPerformed
        // TODO add your handling code here:
      if (addCarrierBox == null) {
            JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
            addCarrierBox = new Przewoźnik_Kontroler(mainFrame,(PrzewoznikTable) carriersTable.getModel());
            addCarrierBox.setLocationRelativeTo(mainFrame);
        }
        AdBusApp.getApplication().show(addCarrierBox);
    }//GEN-LAST:event_newCarrierButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku szukaj z wybranym filtrem w linii*/
    private void lineSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lineSearchButtonActionPerformed
        // TODO add your handling code here:
        ((LiniaTable) linesTable.getModel()).setNumberLineFilter(lineNrFilterTextField.getText());
        ((LiniaTable) linesTable.getModel()).setCarrierFilter((Przewoznik) lineCarrierFilterComboBox.getSelectedItem());
        ((LiniaTable) linesTable.getModel()).setWordFilter(lineKeywordsFilterTextField.getText());
        ((LiniaTable) linesTable.getModel()).setNumberVehicleFilter(lineWehicleNrFilterTextField.getText());
        ((LiniaTable) linesTable.getModel()).setTypeFilter((Typ) lineTypeFilterComboBox.getSelectedItem());
        ((LiniaTable) linesTable.getModel()).setModelFilter((Model) lineModelFilterComboBox.getSelectedItem());
        
        ((LiniaTable) linesTable.getModel()).zaladuj();
    }//GEN-LAST:event_lineSearchButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku reset w linii*/
    private void resetLinesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetLinesButtonActionPerformed
        // TODO add your handling code here:
        lineNrFilterTextField.setText("");
        lineKeywordsFilterTextField.setText("");
        lineWehicleNrFilterTextField.setText("");
        lineTypeFilterComboBox.getModel().setSelectedItem(lineTypeFilterComboBox.getModel().getElementAt(0));
        lineModelFilterComboBox.getModel().setSelectedItem(lineModelFilterComboBox.getModel().getElementAt(0));

        lineCarrierFilterComboBox.getModel().setSelectedItem(lineCarrierFilterComboBox.getModel().getElementAt(0));
        ((LiniaTable) linesTable.getModel()).resetFilters();
    }//GEN-LAST:event_resetLinesButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku dodawania nowej linii*/
    private void newLineButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newLineButtonActionPerformed
      if (addLineBox == null) {
            JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
            addLineBox = new Linia_Kontroler(mainFrame,(LiniaTable) linesTable.getModel());
            addLineBox.setLocationRelativeTo(mainFrame);
        }
        AdBusApp.getApplication().show(addLineBox);
    }//GEN-LAST:event_newLineButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku usuwania klienta*/
    private void deleteClientButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteClientButtonActionPerformed
        //clientsTable.getSe
        ListSelectionModel lsm = clientsTable.getSelectionModel();
         for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               ((KlientTable) clientsTable.getModel()).delete(i);
            }
         }
    }//GEN-LAST:event_deleteClientButtonActionPerformed

    private void deleteCarrierButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteCarrierButtonMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_deleteCarrierButtonMouseClicked
/**metoda odpowiedzialna za obsluge przycisku usuwania przewoznika*/
    private void deleteCarrierButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteCarrierButtonActionPerformed
        // TODO add your handling code here:
        ListSelectionModel lsm = carriersTable.getSelectionModel();
        for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               ((PrzewoznikTable) carriersTable.getModel()).delete(i);
            }
        }
    }//GEN-LAST:event_deleteCarrierButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku usuwania linii*/
    private void deleteLineButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteLineButtonActionPerformed
        // TODO add your handling code here:
       ListSelectionModel lsm = linesTable.getSelectionModel();
       for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               ((LiniaTable) linesTable.getModel()).delete(i);
            }
        }
    }//GEN-LAST:event_deleteLineButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku usuwania kampanii*/
    private void deleteCampaignButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteCampaignButtonActionPerformed
        // TODO add your handling code here:
       ListSelectionModel lsm = campaignsTable.getSelectionModel();
       for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               ((KampaniaTable) campaignsTable.getModel()).delete(i);
            }
        }
    }//GEN-LAST:event_deleteCampaignButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku edycji klienta*/
    private void editClientButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editClientButtonActionPerformed
        ListSelectionModel lsm = clientsTable.getSelectionModel();
         for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               Klient k = new Klient();

               Integer kid = (Integer) (clientsTable.getModel().getValueAt(i, 0));
               k.pobierzWgId(kid);
               System.out.println(k);
               JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
               Klient_Kontroler kkont = new Klient_Kontroler(mainFrame,((KlientTable) clientsTable.getModel()), k);
               kkont.setVisible(true);
            }
         }
    }//GEN-LAST:event_editClientButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku usuniecia pojazdu*/
    private void lineWehicleDelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lineWehicleDelButtonActionPerformed
        Linia l = new Linia();
        JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
        Pojazd_Kontroler ctrl = new Pojazd_Kontroler(mainFrame, true);
         ListSelectionModel lsm = (ListSelectionModel) linesTable.getSelectionModel();
        for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
                int id = (Integer) linesTable.getValueAt(i, 0);
        
                l.pobierzWgId(id);
                ctrl.setLine(l);
                ctrl.setVisible(true);
                break;
            }
        }        
    }//GEN-LAST:event_lineWehicleDelButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku edycji przewoznika*/
    private void editCarrierButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editCarrierButtonActionPerformed
        ListSelectionModel lsm = carriersTable.getSelectionModel();
         for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               Przewoznik p = new Przewoznik();

               Integer pid = (Integer) (carriersTable.getModel().getValueAt(i, 0));
               p.pobierzWgId(pid);
               System.out.println(p);
               JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
               Przewoźnik_Kontroler pkont = new Przewoźnik_Kontroler(mainFrame,((PrzewoznikTable) carriersTable.getModel()), p);
               pkont.setVisible(true);
            }
         }
    }//GEN-LAST:event_editCarrierButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku edycji linii*/
    private void editLineButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editLineButtonActionPerformed
        ListSelectionModel lsm = linesTable.getSelectionModel();
         for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               Linia l = new Linia();

               Integer lid = (Integer) (linesTable.getModel().getValueAt(i, 0));
               l.pobierzWgId(lid);
               System.out.println(l);
               JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
               Linia_Kontroler lkont = new Linia_Kontroler(mainFrame,((LiniaTable) linesTable.getModel()), l);
               lkont.setVisible(true);
            }
         }
    }//GEN-LAST:event_editLineButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku dodania pojazdu*/
    private void lineWehicleAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lineWehicleAddButtonActionPerformed
        if(!lineWehiclesList.isSelectionEmpty()) {
            Pojazd temp = (Pojazd) lineWehiclesList.getSelectedValue();
             ListSelectionModel lsm = linesTable.getSelectionModel();
             for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
                if(lsm.isSelectedIndex(i)) {
                   Linia l = new Linia();

                   temp.delete();
                   ((PojazdList)lineWehiclesList.getModel()).zaladuj();
                   break;
                }
             }
        }
    }//GEN-LAST:event_lineWehicleAddButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku szczegolow przewoznikow*/
    private void campaignCarriersDetailsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_campaignCarriersDetailsButtonActionPerformed
        displayCarrierDetails((Przewoznik)campaignCarriersList.getSelectedValue());
        
        tabs.setSelectedIndex(2);
        //carriersTab.setVisible(true);
    }//GEN-LAST:event_campaignCarriersDetailsButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku szczegolow linii*/
    private void carrierLineButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_carrierLineButtonActionPerformed
         ListSelectionModel lsm = carriersTable.getSelectionModel();
         for(int i=lsm.getMinSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
               Przewoznik p = new Przewoznik();

               Integer pid = (Integer) (carriersTable.getModel().getValueAt(i, 0));
               p.pobierzWgId(pid);
               ((PrzewoznikList)lineCarrierFilterComboBox.getModel()).setSelectedItem(p);
               ((LiniaTable)linesTable.getModel()).setCarrierFilter(p);
               ((LiniaTable)linesTable.getModel()).zaladuj();
               tabs.setSelectedIndex(3);
            }
         }
    }//GEN-LAST:event_carrierLineButtonActionPerformed
/**metoda odpowiedzialna za obsluge przycisku szukaj z wybranym filtrem w kampanii*/
    private void searchCampaignsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchCampaignsButtonActionPerformed
        ((KampaniaTable) campaignsTable.getModel()).setDateFilter(
                campaignFromDate1FilterTextField.getText(),
                campaignFromDate2FilterTextField.getText(),
                campaignToDate1TextField.getText(),
                campaignToDate2FilterTextField.getText()
                );
        ((KampaniaTable) campaignsTable.getModel()).setClientFilter((Klient)clientsComboBox.getSelectedItem());
        ((KampaniaTable) campaignsTable.getModel()).setCarrierFilter((Przewoznik) carriersFilterComboBox.getSelectedItem());
        ((KampaniaTable) campaignsTable.getModel()).setLineFilter((Linia) linesFilterComboBox.getSelectedItem());
        ((KampaniaTable) campaignsTable.getModel()).zaladuj();
    }//GEN-LAST:event_searchCampaignsButtonActionPerformed
/**metoda odpowiedzialna z obsluge przycisku edytuj kampanie*/
    private void editCampaignButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editCampaignButtonActionPerformed
       //if (addCampaignBox == null) {
        if (!campaignsTable.getSelectionModel().isSelectionEmpty()) {
            Kampania k = null;
            ListSelectionModel lsm = (ListSelectionModel) campaignsTable.getSelectionModel();
            for (int i = lsm.getMaxSelectionIndex(); i <= lsm.getMaxSelectionIndex(); i++) {
                if (lsm.isSelectedIndex(i)) {
                    int id = (Integer) campaignsTable.getValueAt(i, 0);
                    k = new Kampania();
                    k.pobierzWgId(id);
                    //displayCampaingDetails(k);
                }
            }
            JFrame mainFrame = AdBusApp.getApplication().getMainFrame();
            addCampaignBox = new Kampania_Kontroler(mainFrame, (KampaniaTable) campaignsTable.getModel(), k);
            addCampaignBox.setLocationRelativeTo(mainFrame);
            //}
            AdBusApp.getApplication().show(addCampaignBox);
        }
    }//GEN-LAST:event_editCampaignButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel campaignAddedDate;
    private javax.swing.JLabel campaignAddedLabel;
    private javax.swing.JLabel campaignAdvertsLabel;
    private javax.swing.JList campaignAdvertsList;
    private javax.swing.JScrollPane campaignAdvertsPanel;
    private javax.swing.JButton campaignCarriersDetailsButton;
    private javax.swing.JLabel campaignCarriersLabel;
    private javax.swing.JList campaignCarriersList;
    private javax.swing.JScrollPane campaignCarriersScrollPane;
    private javax.swing.JButton campaignClientDetailsButton;
    private javax.swing.JLabel campaignClientLabel;
    private javax.swing.JLabel campaignClientName;
    private javax.swing.JTextArea campaignDescription;
    private javax.swing.JScrollPane campaignDescriptionPanel;
    private javax.swing.JPanel campaignDetails;
    private javax.swing.JPanel campaignFiltersPanel;
    private javax.swing.JLabel campaignFromDate;
    private javax.swing.JTextField campaignFromDate1FilterTextField;
    private javax.swing.JTextField campaignFromDate2FilterTextField;
    private javax.swing.JLabel campaignFromEndFilterLabel;
    private javax.swing.JLabel campaignFromFilterLabel;
    private javax.swing.JLabel campaignFromLabel;
    private javax.swing.JLabel campaignLastsLabel;
    private javax.swing.JLabel campaignNameLabel;
    private javax.swing.JLabel campaignToDate;
    private javax.swing.JTextField campaignToDate1TextField;
    private javax.swing.JTextField campaignToDate2FilterTextField;
    private javax.swing.JLabel campaignToDateFilterLabel;
    private javax.swing.JLabel campaignToEndFilterLabel;
    private javax.swing.JLabel campaignToLabel;
    private javax.swing.JScrollPane campaignsScrollPane;
    private javax.swing.JPanel campaignsTab;
    private javax.swing.JTable campaignsTable;
    private javax.swing.JLabel carrierAdded;
    private javax.swing.JLabel carrierAddedLabel;
    private javax.swing.JLabel carrierAddressFilterLabel;
    private javax.swing.JTextField carrierAddressFilterTextField;
    private javax.swing.JLabel carrierAddressLabel;
    private javax.swing.JLabel carrierAddressLine1;
    private javax.swing.JLabel carrierAddressLine2;
    private javax.swing.JLabel carrierContactMail;
    private javax.swing.JLabel carrierContactPersonFilterLabel;
    private javax.swing.JTextField carrierContactPersonFilterTextField;
    private javax.swing.JLabel carrierContactPersonLabel;
    private javax.swing.JLabel carrierContactPersonName;
    private javax.swing.JLabel carrierContactPhone;
    private javax.swing.JTextArea carrierDescription;
    private javax.swing.JScrollPane carrierDescriptionScrollPanel;
    private javax.swing.JPanel carrierDetails;
    private javax.swing.JPanel carrierFilterPanel;
    private javax.swing.JButton carrierLineButton;
    private javax.swing.JLabel carrierLinesLabel;
    private javax.swing.JLabel carrierMail;
    private javax.swing.JLabel carrierMailFilterLabel;
    private javax.swing.JTextField carrierMailFilterTextField;
    private javax.swing.JLabel carrierMailLabel;
    private javax.swing.JLabel carrierName;
    private javax.swing.JLabel carrierNameFilterLabel;
    private javax.swing.JTextField carrierNameFilterTextField;
    private javax.swing.JLabel carrierPhone;
    private javax.swing.JLabel carrierPhoneFilterLabel;
    private javax.swing.JTextField carrierPhoneFilterTextField;
    private javax.swing.JLabel carrierPhoneLabel;
    private javax.swing.JButton carrierSearchButton;
    private javax.swing.JComboBox carriersFilterComboBox;
    private javax.swing.JLabel carriersFilterLabel;
    private javax.swing.JButton carriersResetButton;
    private javax.swing.JScrollPane carriersScrollPanel;
    private javax.swing.JPanel carriersTab;
    private javax.swing.JTable carriersTable;
    private javax.swing.JLabel clientAddedDate;
    private javax.swing.JLabel clientAddedDateLabel;
    private javax.swing.JLabel clientAddressFilterLabel;
    private javax.swing.JTextField clientAddressFilterTextField;
    private javax.swing.JLabel clientAddressLabel;
    private javax.swing.JLabel clientAddressLine1;
    private javax.swing.JLabel clientAddressLine2;
    private javax.swing.JLabel clientContactPersonFilterLabel;
    private javax.swing.JTextField clientContactPersonFilterTextField;
    private javax.swing.JTextArea clientDescription;
    private javax.swing.JPanel clientDetailsPanel;
    private javax.swing.JPanel clientFilterPanel;
    private javax.swing.JLabel clientMail;
    private javax.swing.JLabel clientMailFilterLabel;
    private javax.swing.JTextField clientMailFilterTextField;
    private javax.swing.JLabel clientMailLabel;
    private javax.swing.JLabel clientName;
    private javax.swing.JLabel clientNameFilterLabel;
    private javax.swing.JTextField clientNameFilterTextField;
    private javax.swing.JLabel clientNip;
    private javax.swing.JLabel clientNipFilterLabel;
    private javax.swing.JTextField clientNipFilterTextField;
    private javax.swing.JLabel clientNipLabel;
    private javax.swing.JLabel clientPhone;
    private javax.swing.JLabel clientPhoneFilterLabel;
    private javax.swing.JTextField clientPhoneFilterTextField;
    private javax.swing.JLabel clientPhoneLabel;
    private javax.swing.JComboBox clientsComboBox;
    private javax.swing.JLabel clientsFilterLabel;
    private javax.swing.JScrollPane clientsScrollPanel;
    private javax.swing.JPanel clientsTab;
    private javax.swing.JTable clientsTable;
    private javax.swing.JLabel contactPersonLabel;
    private javax.swing.JLabel contactPersonMail;
    private javax.swing.JLabel contactPersonName;
    private javax.swing.JLabel contactPersonPhone;
    private javax.swing.JButton deleteCampaignButton;
    private javax.swing.JButton deleteCarrierButton;
    private javax.swing.JButton deleteClientButton;
    private javax.swing.JButton deleteLineButton;
    private javax.swing.JScrollPane descriptionScrollPanel;
    private javax.swing.JButton editCampaignButton;
    private javax.swing.JButton editCarrierButton;
    private javax.swing.JButton editClientButton;
    private javax.swing.JButton editLineButton;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JComboBox lineCarrierFilterComboBox;
    private javax.swing.JLabel lineCarrierFilterLabel;
    private javax.swing.JLabel lineCarrierName;
    private javax.swing.JLabel lineCarrierNameLabel;
    private javax.swing.JLabel lineCoursesLabel;
    private javax.swing.JCheckBox lineDay;
    private javax.swing.JTextArea lineDescription;
    private javax.swing.JLabel lineDescriptionLabel;
    private javax.swing.JScrollPane lineDescriptionScrollPanel;
    private javax.swing.JPanel lineDetailsPanel;
    private javax.swing.JTextArea lineKeywords;
    private javax.swing.JLabel lineKeywordsFilterLabel;
    private javax.swing.JTextField lineKeywordsFilterTextField;
    private javax.swing.JLabel lineKeywordsLabel;
    private javax.swing.JComboBox lineModelFilterComboBox;
    private javax.swing.JLabel lineModelFilterLabel;
    private javax.swing.JLabel lineNameLabel;
    private javax.swing.JCheckBox lineNight;
    private javax.swing.JLabel lineNrFilterLabel;
    private javax.swing.JTextField lineNrFilterTextField;
    private javax.swing.JButton lineSearchButton;
    private javax.swing.JComboBox lineTypeFilterComboBox;
    private javax.swing.JLabel lineTypeFilterLabel;
    private javax.swing.JCheckBox lineWeekends;
    private javax.swing.JCheckBox lineWeeks;
    private javax.swing.JButton lineWehicleAddButton;
    private javax.swing.JButton lineWehicleDelButton;
    private javax.swing.JLabel lineWehicleNrFilterLabel;
    private javax.swing.JTextField lineWehicleNrFilterTextField;
    private javax.swing.JLabel lineWehiclesLabel;
    private javax.swing.JList lineWehiclesList;
    private javax.swing.JScrollPane lineWehiclesScrollPanel;
    private javax.swing.JScrollPane linekeywordsScrollPanel;
    private javax.swing.JComboBox linesFilterComboBox;
    private javax.swing.JLabel linesFilterLabel;
    private javax.swing.JPanel linesFilterPanel;
    private javax.swing.JScrollPane linesScrollPanel;
    private javax.swing.JPanel linesTab;
    private javax.swing.JTable linesTable;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JButton newCampaignButton;
    private javax.swing.JButton newCarrierButton;
    private javax.swing.JButton newClientButton;
    private javax.swing.JButton newLineButton;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JButton resetCampaignsButton;
    private javax.swing.JButton resetClientsButton;
    private javax.swing.JButton resetLinesButton;
    private javax.swing.JButton searchCampaignsButton;
    private javax.swing.JButton searchClientsButton;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JTabbedPane tabs;
    // End of variables declaration//GEN-END:variables

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;

    private JDialog aboutBox;

    /**metoda odpowiedzialna za wyswietlanie klienta spelniajacego warunki filtru*/
    public void clientValueChanged(ListSelectionEvent e) {
        ListSelectionModel lsm = (ListSelectionModel) e.getSource();
        for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
                int id = (Integer) clientsTable.getValueAt(i, 0);
                Klient k = new Klient();
                k.pobierzWgId(id);
                displayClientDetails(k);
            }
        }
    }
    /**metoda odpowiedzialna za wyswietlanie szczegolow klienta*/
    public void displayClientDetails(Klient klient) {
        clientName.setText(klient.nazwa);
        clientAddedDate.setText(klient.data_dodania.toString());
        clientAddressLine1.setText(klient.adres);
        clientAddressLine2.setText(klient.miasto);
        clientPhone.setText(klient.telefon);
        clientNip.setText(klient.nip);
        clientMail.setText(klient.mail);
        clientDescription.setText(klient.uwagi);
        if(klient.ok_imie!=null && klient.ok_nazwisko!=null)
            contactPersonName.setText(klient.ok_imie + " " + klient.ok_nazwisko);
        contactPersonPhone.setText(klient.ok_telefon);
        contactPersonMail.setText(klient.ok_mail);
    }

    /**metoda odpowiedzialna za wyswietlanie przewoznika spelniajacego warunki filtru*/
    public void carrierValueChanged(ListSelectionEvent e) {
        ListSelectionModel lsm = (ListSelectionModel) e.getSource();
        for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
                int id = (Integer) carriersTable.getValueAt(i, 0);
                Przewoznik p = new Przewoznik();
                p.pobierzWgId(id);
                displayCarrierDetails(p);
            }
        }
    }
    /**metoda odpowiedzialna za wyswietlanie szczegolow przewoznika*/
    public void displayCarrierDetails(Przewoznik przewoznik) {
        carrierName.setText(przewoznik.nazwa);
        carrierAdded.setText(przewoznik.data_dodania.toString());
        carrierAddressLine1.setText(przewoznik.adres);
        carrierAddressLine2.setText(przewoznik.miasto);
        carrierPhone.setText(przewoznik.telefon);
        carrierMail.setText(przewoznik.mail);
        carrierDescription.setText(przewoznik.uwagi);
       // if(przewoznik.ok_imie!=null && przewoznik.ok_nazwisko!=null)
            carrierContactPersonName.setText(przewoznik.ok_imie + " " + przewoznik.ok_nazwisko);
        carrierContactPhone.setText(przewoznik.ok_telefon);
        carrierContactMail.setText(przewoznik.ok_mail);
    }
    /**metoda odpowiedzialna za wyswietlanie linii spelniajacego warunki filtru*/
    public void lineValueChanged(ListSelectionEvent e) {
        ListSelectionModel lsm = (ListSelectionModel) e.getSource();
        for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
                int id = (Integer) linesTable.getValueAt(i, 0);
                Linia l = new Linia();
                l.pobierzWgId(id);
                displayLineDetails(l);
            }
        }
    }

/**metoda odpowiedzialna za wyswietlanie szczegolow linii*/
    public void displayLineDetails(Linia linia) {
        lineNameLabel.setText(linia.nr_lini);
        lineDay.setSelected(linia.dzienny);
        lineDescription.setText(linia.uwagi);
        lineNight.setSelected(linia.nocny);
        lineWeekends.setSelected((linia.weekendy));
        lineWeeks.setSelected((linia.robocze));
        //lineKeywords.setText(linia.getTags());
        lineWehiclesList.setModel(linia.pobierzPojazdy());
        lineCarrierName.setText(linia.carrier_name);
        lineKeywords.setText(linia.trasa);
    }
/**metoda odpowiedzialna za wyswietlanie kampanii spelniajacego warunki filtru*/
     public void campaignValueChanged(ListSelectionEvent e) {
        ListSelectionModel lsm = (ListSelectionModel) e.getSource();
        for(int i=lsm.getMaxSelectionIndex(); i<=lsm.getMaxSelectionIndex(); i++) {
            if(lsm.isSelectedIndex(i)) {
                int id = (Integer) campaignsTable.getValueAt(i, 0);
                Kampania k = new Kampania();
                k.pobierzWgId(id);
                displayCampaingDetails(k);
            }
        }
    }
/**metoda odpowiedzialna za wyswietlanie szczegolow kampanii*/
     public void displayCampaingDetails(Kampania kampania) {
        campaignAddedDate.setText(kampania.data_dodania);
        campaignFromDate.setText(kampania.data_rozpoczecia);
        campaignToDate.setText(kampania.data_zakonczenia);
        campaignClientName.setText(kampania.klient);
        campaignCarriersList.setModel(kampania.przewoznicy());
        campaignNameLabel.setText(kampania.nazwa);
        kampania.zaladujReklamy();
        campaignAdvertsList.setModel(kampania.adverts);
     }
}
